<template>
    <div class="son">
        <slot name="a"></slot>
        <ul>
            <li v-for="(item,index) in data">
            <!-- 回传数据给到父组件，aaa、bbb是自定义的属性 -->
                <slot :aaa="item" :bbb="index"></slot>
            </li>
        </ul>
        <slot name="b"></slot>
    </div>
</template>

<script lang="ts">
import { defineComponent, useAttrs, ref, defineExpose } from "vue"
import useDemoStore from "../store/modules/demo"
export default defineComponent({
    name: "Ch",
    props: ["data"],
    setup(props) {
        console.log("data", props.data)

        return {}
    },
})
</script>

<style scoped>
.son {
    border: 2px solid cadetblue;
    font-size: 16px;
}
</style>
